<?php
/**
 * Model dla klasy UserAccess
 *
 * @author ModGen
 */

class UserAccess extends DataObject{


	/**
	 * nazwa tabeli
	 */
	static $tableName = 'user_access';

	/**
	 * nazwa klucza tabeli
	 */
	static $classTablePK = 'id_user_access';

	/**
	 * nazwa klasy
	 */
	static $className = __CLASS__;

	/**
	 * tablica mapująca pola klasy
	 */
	static $fields = array(
		'id_user_access' => 'id',
		'id_user' => 'idUser',
		'access_resource' => 'accessResource',
		'has_access' => 'hasAccess',
		'status' => 'status',
		'date_insert' => 'dateInsert',
		'date_update' => 'dateUpdate'
	);


	protected $id;
	private $idUser;
	private $accessResource;
	private $hasAccess;
	private $status;
	private $dateInsert;
	private $dateUpdate;



	// -- Konstruktor --


	function __construct( $id = -1 , $idUser = null, $accessResource = null, $hasAccess = null, $status = null, $dateInsert = null, $dateUpdate = null){
		$this->id = $id;
		$this->idUser = $idUser;
		$this->accessResource = $accessResource;
		$this->hasAccess = $hasAccess;
		$this->status = $status;
		$this->dateInsert = $dateInsert;
		$this->dateUpdate = $dateUpdate;
	}



	// -- Get-y i Set-y --

	public function getId(){
		return $this->id;
	}

	public function setId($id){
		$this->id = $id;
	}

	
	public function getIdUser(){
		return $this->idUser;
	}

	public function setIdUser($idUser){
		$this->idUser = $idUser;
	}

	
	public function getAccessResource(){
		return $this->accessResource;
	}

	public function setAccessResource($accessResource){
		$this->accessResource = $accessResource;
	}

	
	public function getHasAccess(){
		return $this->hasAccess;
	}

	public function setHasAccess($hasAccess){
		$this->hasAccess = $hasAccess;
	}

	
	public function getStatus(){
		return $this->status;
	}

	public function setStatus($status){
		$this->status = $status;
	}

	
	public function getDateInsert(){
		return $this->dateInsert;
	}

	public function setDateInsert($dateInsert){
		$this->dateInsert = $dateInsert;
	}

	
	public function getDateUpdate(){
		return $this->dateUpdate;
	}

	public function setDateUpdate($dateUpdate){
		$this->dateUpdate = $dateUpdate;
	}

	




	/**
	* Pobiera nazwę tabeli reprezentującej obiekt w SQL
	* @return string
	*/
	public  function GetTableName(){
	return self::$tableName;
	}

	/**
	* Pobiera nazwę klucza głównego tabeli
	* @return string
	*/
	public function GetClassTablePK() {
		return self::$classTablePK;
	}

	/**
	* Pobiera tablice mapującą pola klasy na pola tabeli
	* @return array
	*/
	public  function GetFields(){
		return self::$fields;
	}

	/**
	* Pobiera nazwę klasy
	* @return string
	*/
	public  function GetClassName(){
		return self::$className;
	}



}
?>